package org.xfy.sys.mapper;

import org.apache.ibatis.annotations.Param;
import org.xfy.base.util.AjaxResult;
import org.xfy.sys.domain.Menu;
import org.xfy.sys.domain.Role;
import org.xfy.base.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xfy
 * @since 2023-11-06
 */
public interface RoleMapper extends BaseMapper<Role> {

    Role findBysn(@Param("id") Long id,@Param("sn") String sn);

    void addRoleAndMenu(@Param("id") Long id, @Param("menuId") List<Long> menuId);

    void addRoleAndPermission(@Param("id")Long id, @Param("permissionId")List<Long> permissionId);

    List<Long> getPermissionByroleId(Long roleId);

    List<Menu> findMenuByroleId(Long roleId);

    void delRoleAndMenu(Long id);

    void delRoleAndPermission(Long id);
}
